Integrand size = 23, antiderivative size = 177 \[ \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx=\frac {2 a^3 (7+4 n) \sec ^{1+n}(e+f x) \sin (e+f x)}{f (1+2 n) (3+2 n) \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 \sec ^{1+n}(e+f x) \sqrt {a+a \sec (e+f x)} \sin (e+f x)}{f (3+2 n)}+\frac {2 a^3 \left (3+24 n+16 n^2\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},1-\sec (e+f x)\right ) \tan (e+f x)}{f (1+2 n) (3+2 n) \sqrt {a+a \sec (e+f x)}} \]
2*a^3*(7+4*n)*sec(f*x+e)^(1+n)*sin(f*x+e)/f/(4*n^2+8*n+3)/(a+a*sec(f*x+e)) ^(1/2)+2*a^2*sec(f*x+e)^(1+n)*sin(f*x+e)*(a+a*sec(f*x+e))^(1/2)/f/(3+2*n)+ 2*a^3*(16*n^2+24*n+3)*hypergeom([1/2, 1-n],[3/2],1-sec(f*x+e))*tan(f*x+e)/ f/(4*n^2+8*n+3)/(a+a*sec(f*x+e))^(1/2)
Result contains complex when optimal does not.
Time = 3.58 (sec) , antiderivative size = 400, normalized size of antiderivative = 2.26 \[ \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx=-\frac {i 2^{-\frac {5}{2}+n} e^{-\frac {1}{2} i (3+2 n) (e+f x)} \left (\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{\frac {3}{2}+n} \left (\frac {10 e^{i (2+n) (e+f x)} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (-1-n),\frac {4+n}{2},-e^{2 i (e+f x)}\right )}{2+n}+\frac {5 e^{i (4+n) (e+f x)} \operatorname {Hypergeometric2F1}\left (1,\frac {1-n}{2},\frac {6+n}{2},-e^{2 i (e+f x)}\right )}{4+n}+\frac {e^{i n (e+f x)} \operatorname {Hypergeometric2F1}\left (1,-\frac {3}{2}-\frac {n}{2},1+\frac {n}{2},-e^{2 i (e+f x)}\right )}{n}+\frac {5 e^{i (1+n) (e+f x)} \operatorname {Hypergeometric2F1}\left (1,-1-\frac {n}{2},\frac {3+n}{2},-e^{2 i (e+f x)}\right )}{1+n}+\frac {e^{i (5+n) (e+f x)} \operatorname {Hypergeometric2F1}\left (1,1-\frac {n}{2},\frac {7+n}{2},-e^{2 i (e+f x)}\right )}{5+n}+\frac {10 e^{i (3+n) (e+f x)} \operatorname {Hypergeometric2F1}\left (1,-\frac {n}{2},\frac {5+n}{2},-e^{2 i (e+f x)}\right )}{3+n}\right ) \sec ^5\left (\frac {1}{2} (e+f x)\right ) (a (1+\sec (e+f x)))^{5/2}}{f \sec ^{\frac {5}{2}}(e+f x)} \]
((-I)*2^(-5/2 + n)*(E^(I*(e + f*x))/(1 + E^((2*I)*(e + f*x))))^(3/2 + n)*( (10*E^(I*(2 + n)*(e + f*x))*Hypergeometric2F1[1, (-1 - n)/2, (4 + n)/2, -E ^((2*I)*(e + f*x))])/(2 + n) + (5*E^(I*(4 + n)*(e + f*x))*Hypergeometric2F 1[1, (1 - n)/2, (6 + n)/2, -E^((2*I)*(e + f*x))])/(4 + n) + (E^(I*n*(e + f *x))*Hypergeometric2F1[1, -3/2 - n/2, 1 + n/2, -E^((2*I)*(e + f*x))])/n + (5*E^(I*(1 + n)*(e + f*x))*Hypergeometric2F1[1, -1 - n/2, (3 + n)/2, -E^(( 2*I)*(e + f*x))])/(1 + n) + (E^(I*(5 + n)*(e + f*x))*Hypergeometric2F1[1, 1 - n/2, (7 + n)/2, -E^((2*I)*(e + f*x))])/(5 + n) + (10*E^(I*(3 + n)*(e + f*x))*Hypergeometric2F1[1, -1/2*n, (5 + n)/2, -E^((2*I)*(e + f*x))])/(3 + n))*Sec[(e + f*x)/2]^5*(a*(1 + Sec[e + f*x]))^(5/2))/(E^((I/2)*(3 + 2*n)* (e + f*x))*f*Sec[e + f*x]^(5/2))
Time = 0.78 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.98, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3042, 4301, 27, 3042, 4504, 3042, 4293, 75}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sec (e+f x)+a)^{5/2} \sec ^n(e+f x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^{5/2} \csc \left (e+f x+\frac {\pi }{2}\right )^ndx\) |
\(\Big \downarrow \) 4301 |
\(\displaystyle \frac {2 a \int \frac {1}{2} \sec ^n(e+f x) \sqrt {\sec (e+f x) a+a} (a (4 n+3)+a (4 n+7) \sec (e+f x))dx}{2 n+3}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a \int \sec ^n(e+f x) \sqrt {\sec (e+f x) a+a} (a (4 n+3)+a (4 n+7) \sec (e+f x))dx}{2 n+3}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \csc \left (e+f x+\frac {\pi }{2}\right )^n \sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a} \left (a (4 n+3)+a (4 n+7) \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx}{2 n+3}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)}\) |
\(\Big \downarrow \) 4504 |
\(\displaystyle \frac {a \left (\frac {a \left (16 n^2+24 n+3\right ) \int \sec ^n(e+f x) \sqrt {\sec (e+f x) a+a}dx}{2 n+1}+\frac {2 a^2 (4 n+7) \sin (e+f x) \sec ^{n+1}(e+f x)}{f (2 n+1) \sqrt {a \sec (e+f x)+a}}\right )}{2 n+3}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \left (\frac {a \left (16 n^2+24 n+3\right ) \int \csc \left (e+f x+\frac {\pi }{2}\right )^n \sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx}{2 n+1}+\frac {2 a^2 (4 n+7) \sin (e+f x) \sec ^{n+1}(e+f x)}{f (2 n+1) \sqrt {a \sec (e+f x)+a}}\right )}{2 n+3}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)}\) |
\(\Big \downarrow \) 4293 |
\(\displaystyle \frac {a \left (\frac {2 a^2 (4 n+7) \sin (e+f x) \sec ^{n+1}(e+f x)}{f (2 n+1) \sqrt {a \sec (e+f x)+a}}-\frac {a^3 \left (16 n^2+24 n+3\right ) \tan (e+f x) \int \frac {\sec ^{n-1}(e+f x)}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)}{f (2 n+1) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\right )}{2 n+3}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)}\) |
\(\Big \downarrow \) 75 |
\(\displaystyle \frac {a \left (\frac {2 a^2 \left (16 n^2+24 n+3\right ) \tan (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},1-\sec (e+f x)\right )}{f (2 n+1) \sqrt {a \sec (e+f x)+a}}+\frac {2 a^2 (4 n+7) \sin (e+f x) \sec ^{n+1}(e+f x)}{f (2 n+1) \sqrt {a \sec (e+f x)+a}}\right )}{2 n+3}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)}\) |
(2*a^2*Sec[e + f*x]^(1 + n)*Sqrt[a + a*Sec[e + f*x]]*Sin[e + f*x])/(f*(3 + 2*n)) + (a*((2*a^2*(7 + 4*n)*Sec[e + f*x]^(1 + n)*Sin[e + f*x])/(f*(1 + 2 *n)*Sqrt[a + a*Sec[e + f*x]]) + (2*a^2*(3 + 24*n + 16*n^2)*Hypergeometric2 F1[1/2, 1 - n, 3/2, 1 - Sec[e + f*x]]*Tan[e + f*x])/(f*(1 + 2*n)*Sqrt[a + a*Sec[e + f*x]])))/(3 + 2*n)
3.4.7.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x )^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[n] && (IntegerQ[m] || GtQ[-d/(b*c), 0])
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[a^2*d*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]] *Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(d*x)^(n - 1)/Sqrt[a - b*x], x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[(-b^2)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 2)*((d*Csc[e + f*x])^n/(f*(m + n - 1))), x] + Simp[b/(m + n - 1) Int[(a + b*Csc[e + f*x])^(m - 2)*(d*Csc[e + f*x])^n*(b*(m + 2*n - 1) + a*(3*m + 2*n - 4)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^ 2, 0] && GtQ[m, 1] && NeQ[m + n - 1, 0] && IntegerQ[2*m]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[-2*b*B*C ot[e + f*x]*((d*Csc[e + f*x])^n/(f*(2*n + 1)*Sqrt[a + b*Csc[e + f*x]])), x] + Simp[(A*b*(2*n + 1) + 2*a*B*n)/(b*(2*n + 1)) Int[Sqrt[a + b*Csc[e + f* x]]*(d*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ [A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[A*b*(2*n + 1) + 2*a*B*n, 0] && !LtQ[n, 0]
\[\int \sec \left (f x +e \right )^{n} \left (a +a \sec \left (f x +e \right )\right )^{\frac {5}{2}}d x\]
\[ \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} \sec \left (f x + e\right )^{n} \,d x } \]
integral((a^2*sec(f*x + e)^2 + 2*a^2*sec(f*x + e) + a^2)*sqrt(a*sec(f*x + e) + a)*sec(f*x + e)^n, x)
Timed out. \[ \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx=\text {Timed out} \]
\[ \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} \sec \left (f x + e\right )^{n} \,d x } \]
\[ \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} \sec \left (f x + e\right )^{n} \,d x } \]
Timed out. \[ \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx=\int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (\frac {1}{\cos \left (e+f\,x\right )}\right )}^n \,d x \]